function promise(api, params = {}, data = {}, method, header={}){
  return new Promise((resolve,reject)=>{
    // api({...params,success:resolve,fail:reject})
    api.call(wx, { ...params, data: data, method: method, header: header, success: resolve, fail: reject})
  })
}
module.exports={
  request: function (params, data, method,header){
    return promise(wx.request, params, data, method,header)
  }
}